package com.imddysc.codemirror.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.imddysc.codemirror.entity.Codemirrortest01;
import com.imddysc.codemirror.repository.Codemirrortest01Repository;

@Service
public class Codemirrortest01Service {
	
	private static final Logger logger = LoggerFactory.getLogger(Codemirrortest01Service.class);
	
	@Autowired
	private Codemirrortest01Repository codemirrortest01Repository;
	
	public String getJobCodeByJobId(Long jobId) {
		Codemirrortest01 codCodemirrortest01 = codemirrortest01Repository.findById(jobId).orElse(null);
		return codCodemirrortest01.getJobCode();
	}
	
	public Codemirrortest01 saveJobCode(Codemirrortest01 codemirrortest01) {
		return codemirrortest01Repository.saveAndFlush(codemirrortest01);
	}
	

}
